import requests
import time
import sys
sys.path.append("../")
from frameworks.utils.RedisUtil import *
from frameworks.cores.LoadClass import *
from controller.ApiController import *
import json
import time

loader = LoadClass()
redis = RedisUtil()

apiController = ApiController()
numlist = [1,2,3,9]
for num in numlist:
    ck = "zhangting_list_" + str(num)
    newParam = {}
    newParam["num"] = num
    obj = apiController.getZhangTingPage(newParam)
    redis.vset(ck, json.dumps(obj))
    time.sleep(20)